<script setup lang="ts">
import { useMemberStore } from '@/stores'

const memberStore = useMemberStore()
</script>

<template>
  <view class="viewport">
    <!-- 列表1 -->
    <view class="list">
      <navigator url="/pagesMember/address/address" hover-class="none" class="item arrow">
        配送点管理
      </navigator>
    </view>
    <view class="list">
      <navigator v-if="memberStore.profile?.issupermanager == 1" url="/pagesMember/mealcenter/mealcenter"
        hover-class="none" class="item arrow">
        门店管理
      </navigator>
    </view>
    <view class="list">
      <navigator v-if="memberStore.profile?.issupermanager == 1" url="/pagesMember/jiedan/jiedan" hover-class="none"
        class="item arrow">
        截单时间管理
      </navigator>
    </view>
    <view class="list">
      <navigator url="/pagesMember/meal/meal" hover-class="none" class="item arrow">
        套餐管理
      </navigator>
    </view>
    <view class="list">
      <navigator url="/pagesMember/mealcenter/mealcenter" hover-class="none" class="item arrow">
        企业用户管理
      </navigator>
    </view>
    <!-- 列表3 -->
    <view class="list">
      <button hover-class="none" class="item arrow">关于湘味小厨</button>
    </view>
  </view>
</template>

<style lang="scss">
page {
  background-color: #f4f4f4;
}

.viewport {
  padding: 20rpx;
}

/* 列表 */
.list {
  padding: 0 20rpx;
  background-color: #fff;
  margin-bottom: 20rpx;
  border-radius: 10rpx;

  .item {
    line-height: 90rpx;
    padding-left: 10rpx;
    font-size: 30rpx;
    color: #333;
    border-top: 1rpx solid #ddd;
    position: relative;
    text-align: left;
    border-radius: 0;
    background-color: #fff;

    &::after {
      width: auto;
      height: auto;
      left: auto;
      border: none;
    }

    &:first-child {
      border: none;
    }

    &::after {
      right: 5rpx;
    }
  }

  .arrow::after {
    content: '\e6c2';
    position: absolute;
    top: 50%;
    color: #ccc;
    font-family: 'erabbit' !important;
    font-size: 32rpx;
    transform: translateY(-50%);
  }
}

/* 操作按钮 */
.action {
  text-align: center;
  line-height: 90rpx;
  margin-top: 40rpx;
  font-size: 32rpx;
  color: #333;

  .button {
    background-color: #fff;
    margin-bottom: 20rpx;
    border-radius: 10rpx;
  }
}
</style>
